import React, { Component } from 'react';
/* 
    1. 属性代理
    a.1 操作props
*/
class Tesing extends Component {
    state={
        msg:"????",
        news:"消息"
    }
    render() {
        return (
            <div>
                <h1>Tesing组件</h1>   
            </div>
        );
    }
}
/* 
1.react-router withRouter(App) =>添加路由特性
2.connect(props,dispatch)(App) redux 讲到
*/
function HigherOrderComponent(WrappedComponeent){
    return class extends Component{
        handleClick=(e)=>{
            console.log("click方法")
        }
        render(){
            let newProps={
                msg:"🐂"
            }
            return <WrappedComponeent {...newProps}></WrappedComponeent>
        }
    }
}
export default HigherOrderComponent(Tesing);